Reorganize dir structure into entity/, lib/ and sfx/