Added config.js info
Refactored
Added error handling
Readded table for proper event handling