Removed debug code and added minor aesthetic changes