Forked and refactored

Refactored brackets.