Fixed unreachable break statement, minor code formatting