updated index.js to send command line input to TV
refactored module to allow expansion

for additional functions;
- added function comments;
- added key press (on)/release (off) functions