Function tweaks and UI improvements