Updated to Sebastian's changes without undoing my own