Original Konkol Code with Minor Cleanup

No major code changes , primarily removing spaces and adding comments.