removed redundant pieces of code
small fixes and comments
fixed a bug in partition filling
tweaked little things