changed library architecture
renamed some files
minor improvments in test