Added @Required and small refactoring