Initial implementation of AFS

No testing done yet