Cleaned up the code

- removed unnecessary malloc
- spaces, not tabs to indent
- renamed control states to be more logical
- renamed SUSPEND to PAUSE, feels more accurate
- fixed indentation, which was off in places
Merge pull request #714 from hintjens/master

Cleaned up the code