Make it compile and pass tests