Added goal functionality, needs bug fixes