added TPA CS and cleaned up in general