Cleaned code and fixed something in try_values