Cleaned up main recipe code