Final code cleanup