Some clean-ups
Added init script
Fixed writing pid to file