Fix typos causing fatals
Style fix
Make output function sensitive to config-spec
Add hostname handler
Add json flag to config spec
Added lock handler