Worked on my functions a bit. Commented out works in progress, so should compile once compilation issues with id_comapre are fixed