refactored objects. also code cleanup
added object lock