Reverted last commit and made a few small changes