update calculation method for position; close home and activeappchanged; separate show hide logic;