Merge pull request #55 from dshil/master

Remove redundancy during initializations and for loops