Moved object rendering to other method
Added function to call just object as well as render whole javascript thingy