Reintroduced pixel sixe calculation and fixed error in rendering. Still needs work for height.