Started on modes, tweaking some code