cleanup braces and returns