Fully tested all the functions now.