Cleaned up code from debug