Refactor to comply with Makefile conventions