re-factored layout of framework