moved more things to lib, code cleanum