applied formatting and cleanup