Model and main classes