restructured source for better packaging for deployment