Split into three files, setup inst strcture