Started work on 21.js

Added dependent functions and framework of main function