Made work with javascript client, but inheritance remains.

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress

work in progress