Initial implementation, not fully functional.