Removed print statements
Replaced lookup functions with dictionaries