Refactor + some random changes