Removed dead and debugging code