Refactored, changed module structure