Added bunch of stuff including refined tsm