seventh commit - fixed a few bugs, added bunch of ajax to improve funcionality