Renders correctly, need to clean up the code