refactored js with completly new and much better way to create widgets
updated doc