Changes made to main.c to basis writing to BAS file