Adding tests and improving shared models support