add instantiation type checks
Fix UI functionality after refactor
Style fixes