refactoed template logic and moved source to correct folder