#13 Cleaned up code