git ignore and some refactor