use enum for constants
change comments
free all resources on shutdown