Working on improving rendering, changed logic