Implement basic libs; add setup.py and reorganize