More user-friendly UI, memory managing, minor refactoring