Lint python code for cleanliness
Comment code and add abstract gap detection
Added gap detection algorithm