Combined SOM with main executable

Moved SOM features and such to the main executable and added options and
things to handle SOM in main executable