Trying to tidy up the code.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>