Clean up. But still a little hacky