Made code follow Rust style conventions more closely