L0toL1: fully refacotr into different more manageable files