TYPO: tabs to spaces, indentication, etc...
remove and change unused variables
FIX: quantum in simple
FIX: duplicate variables