Added the check for trained coefficients in main, function to convert people to features, reading in of coefficients, general refactoring