Little Code cleanup

attached a bit of code clean up. I don't want to mess around with your code style, so consider it as suggestions. I don't expect this PR 100% to be merged but maybe some it fits your taste:

includes:
* fix indention
* remove trailing spaces (lowers risk of merge conflicts)
* move some stuff to constants
* remove unused vars
* turn `var = something; if var` into `if var = something`
* remove "returns"