fix bugs, add files to gitignore