moved in to 'lib'
minor changes