GH-5 Added comments and removed unused code