Added gitignore
Fixed CS issues
Closes pid file when object is destroyed
Added tests