Cleaning up the code style. Files, functions and variables not used has
been removed.