A lot of this code that is in main methods could be translated into unit tests. That way, this logic will lays be verified when the project is built.