Small refactor and more rspecs. Added debug gems for development.