some beautification and cleanup