Preliminary version, further functionality will be added later.