General improvements (refs #1)

Removed unnecessary code and optimised variable names.