Initial implementation of generic solver