Moved solve-z and solve-u to separate file