Overhauled into prototype constructor

Setup into prototype constructor with proper dependency management.