Small changes to structure. Removed hacks from cytowriter