Refactored for better maven