Fixed and refactored ClassBuilder.