Cleaned up the code.
Added branch instructions.