added inactive state, fixed up UI and text rendering