Added/fixed comments.
Added a metadata file that stores events that happened during logging.
Add a delay when triggering on card insertion to make sure it's not a glitch.