Base code and settings