Refactor, update docs, work on amd