Cleanup and added more search functions