update .gitignore
make some methods private
simplify save code
add findByAttr() method
remove unnessecary brackets from if statements