Reorganize solution a bit