GH-2 Cleaned up code & added annotations