switch to BSD 2-clause license
move internal classes to subfolder