Refactored schema and utilities into app folder.