Refactor some class names and methods
Add more comments to the code
Fix demo bugs with last frame