Added tests.
Moved AppCache into a new file, added project 404 checking and succ/fail
callbacks.