refactored code

• moved test code to it's on file
• broke up js modules and places into their own directory

Signed-off-by: K <mustkre8@gmail.com>