Small fixes

Added visibility change function, but it still doesn’t work properly.
Will have to rewrite completely.