Code Cleanup

old chunks of code were removed
soma function modes and/or merged