Removed unnecessary code / unused functions.