Cleanup

first merge of cleanup branch