Removed array storage method, added menu bar

- Create a writeData method to make code cleaner
- Added comments