ENH: removed unnecessary lines, improved readability and use of smart slices instead of for loops
REL: Version 0.3.2