Refactor and shader troubles