Fix aspect calculation bug
Delete obsolote code