Finish basic implementation
Fix bug where some entries were not printed and add run.sh test script