Merged somgenerator code

Altered code to make it run on the LPCXpresso.
Also added a test