Refactored a bit and added a README