Cleaned up code from last commit