Feature/function partitioning