Removed unused macros and fixed error in function arguments
Filled out the flash save functions