Fixed model and layout issues