Some refacturing:
- combined all stages into one
- removed unnecessary html tags
- removed unnecessary canvas elements