Cleaned up code, deleted print handler