adding options. some cleanup.