Fixed a segmentation fault.
Split main.cpp into several files. Point.h is there, even though it is unused.