fixed psr2 issue and refactored builder. refs #13