Reformat code

reformate model code and added .idea directory to .gitignore