Fixed bugs and added git ignore