Simplified. Removed unecessary class and imports.