closes #9 - change state and some style

Signed-off-by: Alexander Skjolden <alex@plastboks.net>