Added title, cleaned up code