Update structure, various code improvements, added .gitignore