Cleaned up code and removed uneccessary lines.