Fixed small bug. Deprecated code removed.