code cleanup, added zoom functionality