Removed unnecessary global components per ticket #68 and used standard code where applicable.