implemented Object functions
changed to shared and weak ptrs, removed some unnecessary functions