Implemented opening brackets, some refactorings.