Cleaned up code, got rid of unneeded parts of code.