Add backend for Single Host Time Series

Signed-off-by: Kirill Enykeev <enykeev@gmail.com>
Splitting and documenting of complicated functions

Signed-off-by: Kirill Enykeev <enykeev@gmail.com>