fix up build errors after language update

- 'move' function renamed to mv
- Vec::from_slice changed to <slice>.to_vec()
- misc formatting
refactor Buffer::create_or_open()

- removed multiple return paths
- split file content read to separate function
- misc. formatting