Help creating scientific calculator

I have to create a scientific calculator, and was able to make it this far, but am unable to get my M+ M- MC and MR buttons to work. I understand how the buttons work, but am unable to find a function that will make them display what they should. can anybody help with this? additonally, how do i make the decimal point not work after one use?