Added functionality. Made minor changes.