Made things compile and pass tests