Fix store commands to write at correct address
Move platform-specific functions to new System namespace