Updated gitignore, fixed some bugs