Some fixes and initial test