final alpha code. still missing ledge destruction and balances but main components are working