Refactor sweep procedure into multiple routines
[sweeps] removed unused variables
Merge pull request #9 from Xarthisius/sweeps2

Refactor *sweeps*
Merge branch 'master' into int32