Implementation of bracket expression for trigonometry functions and code
refactoring.