refactored piclib package into multiple files