#19 Cleaned up code