Set default empty value for get_last_action method, add get_parent function