Added basic framework to expand on
Borrowed code from Doolean, works now