Changed program to use panels instead

made it easier to implement