[Jered] fixed broken functionality and cleaned up tests and added one