Broke logic from addPoint into several functions.