Initial commit - moved code from project ta.js