fixing all architectural issues #169 #94