Simplify main.lua as most of it is not needed anymore and soon it will be removed