UPDATE: Further code clean-up