Tidied up main
Removed commented-out bypass of acceleration update
Added strictness specifiers to types
Using monad state just because