All funcionalities implemented, missing menu and improved algorithm