Add .ls and .bat, closes #4
Update some methods to use native JS
Remove some code duplication