better braces and cleanup