fix to sort out a numpy mess thing for weights and delays
refixed issue with jamie fix
added start of database support. seems the inserts are bust currently