#16 Cleaned up code