Made changes suggested by Kamil.