finished optimization algorithms + added coffeescript code for search engine