Moved a lot of source code to Salad