Extended the setup methods in pre and post phase. Fixes #27.