Cleanup code a bit and use React proptypes