fix js errors
refactor creating side widget