Removed erros and consolidated programs