Break up source file into smaller chunks

-also adding intersection detection between horizontal ray and Bezier
curves