Started to implement a sam to TCS converter and added some general purpose tools.