Init and reading functions.