Cleaned up changes made by Valeriu