Continued workflow development and some code cleanup